<template>
  <div>
    <h1>分页</h1>
    <van-pagination v-model="cpage" :total-items="total" :items-per-page="3" @change="change"/>
  </div>
</template>

<script>
export default {
  name: "pages",
  props: ['total'],
  data() {
    return {
      cpage: 1
    }
  },
  methods: {
    change(v) {
      this.$emit('cpage', v)
      this.$emit('zzz', '我是子组件')
    },

  }
}
</script>

<style scoped>

</style>
